package view.actions;
import beans.GeneralTo;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import negocio.GeneralManager;
import negocio.GeneralManagerException;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class InicialAction extends Action {
    public ActionForward execute(ActionMapping mapping, ActionForm form, 
                                 HttpServletRequest request, 
                                 HttpServletResponse response) throws IOException, 
                                                                      ServletException {
        //HttpSession session  = request.getSession(false);
        HttpSession session  = request.getSession(false);
        GeneralManager pmg = new GeneralManager();
        GeneralTo oGeneral = new GeneralTo();
        try {
            oGeneral = pmg.getGeneral();
        } catch (GeneralManagerException ex) {
            Logger.getLogger(InicialAction.class.getName()).log(Level.SEVERE, null, ex);
        }
        //
        return mapping.findForward( "success");
    }
}
